<template>
    <div>
        <el-dialog title="新增用户" :visible.sync="dialogVisibleAdd">
            <el-form :label-position="'right'" label-width="80px">
                <el-form-item label="用户名">
                    <el-input placeholder="请输入用户名"></el-input>
                </el-form-item>
                <el-form-item label="密码">
                    <el-input type="password" placeholder="请输入密码"></el-input>
                </el-form-item>
                <el-form-item label="确认密码">
                    <el-input type="password" placeholder="再次确认密码"></el-input>
                </el-form-item>
                <el-form-item label="电子邮件">
                    <el-input placeholder="请输入电子邮件"></el-input>
                </el-form-item>
                <el-form-item label="出生日期">
                    <el-date-picker  align="right" type="date" placeholder="选择日期" :picker-options="$store.state.datePickerOptions" style="width: 100%;"></el-date-picker>
                </el-form-item>
            </el-form>
            <div slot="footer" class="dialog-footer">
                <el-button @click="hidddPage">取 消</el-button>
                <el-button type="primary" @click="hidddPage">确 定</el-button>
            </div>
        </el-dialog>
    </div>
</template>

<script>
    export default {
        name: "AddUser",
        props:['dialogVisiblea'],
        data() {
            return {
                dialogVisibleAdd:false
            };
        },
        methods: {
            hidddPage() {
                console.log('关闭更新用户页面')
                this.$emit('hidddPageAdd')
            }
        },
        watch: {
            dialogVisiblea(newVal,oldVal){
                console.log(oldVal);
                console.log(newVal);
                this.dialogVisibleAdd = newVal;
            }
        }
    }
</script>

<style scoped>

</style>
